﻿namespace WebCrawler
{
    public class CommandLineProcessor
    {
        private string _startUrl;

        public string StartUrl
        {
            get { return _startUrl; }
        }

        public bool TryParse(string[] args)
        {
            if (args.Length != 1) return false;
            _startUrl = args[0];
            
            return UrlParser.IsValidUrl(_startUrl);
        }

        public string GetHelpMessage()
        {
            return "Usage: webcrawler.exe <start-url>";
        }
    }
}